package com.yvon.maple.cloud.api.auth.feign.factory;

import com.yvon.maple.cloud.api.auth.feign.RemoteAuthClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class RemoteAuthFallbackFactory implements FallbackFactory<RemoteAuthClient> {
    @Override
    public RemoteAuthClient create(Throwable throwable) {
        log.error("访问【授权服务-获取Token】发生错误: " + throwable.getMessage());
        return null;
    }
}